﻿using System.Text;

namespace iMarkdown.Blocks;

public class ParagraphBlock : Block
{
    public List<Block> Blocks { get; init; } = [];

    public override string ToHtml()
    {
        var builder = new StringBuilder("<p>");
        foreach (var block in Blocks)
            builder.AppendLine(block.ToHtml());
        builder.AppendLine("</p>");
        return builder.ToString();
    }
}